BASE_URL = "https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/"

URL_MAP = {
    "F-F_Research_Data_Factors": "F-F_Research_Data_Factors_CSV.zip",
    "F-F_Research_Data_Factors_weekly": "F-F_Research_Data_Factors_weekly_CSV.zip",
    "F-F_Research_Data_Factors_daily": "F-F_Research_Data_Factors_daily_CSV.zip",
    "F-F_Research_Data_5_Factors_2x3": "F-F_Research_Data_5_Factors_2x3_CSV.zip",
    "F-F_Research_Data_5_Factors_2x3_daily": "F-F_Research_Data_5_Factors_2x3_daily_CSV.zip",
    "Portfolios_Formed_on_ME": "Portfolios_Formed_on_ME_CSV.zip",
    "Portfolios_Formed_on_ME_Wout_Div": "Portfolios_Formed_on_ME_Wout_Div_CSV.zip",
    "Portfolios_Formed_on_ME_Daily": "Portfolios_Formed_on_ME_Daily_CSV.zip",
    "Portfolios_Formed_on_BE-ME": "Portfolios_Formed_on_BE-ME_CSV.zip",
    "Portfolios_Formed_on_BE-ME_Wout_Div": "Portfolios_Formed_on_BE-ME_Wout_Div_CSV.zip",
    "Portfolios_Formed_on_BE-ME_Daily": "Portfolios_Formed_on_BE-ME_Daily_CSV.zip",
    "Portfolios_Formed_on_OP": "Portfolios_Formed_on_OP_CSV.zip",
    "Portfolios_Formed_on_OP_Wout_Div": "Portfolios_Formed_on_OP_Wout_Div_CSV.zip",
    "Portfolios_Formed_on_OP_Daily": "Portfolios_Formed_on_OP_Daily_CSV.zip",
    "Portfolios_Formed_on_INV": "Portfolios_Formed_on_INV_CSV.zip",
    "Portfolios_Formed_on_INV_Wout_Div": "Portfolios_Formed_on_INV_Wout_Div_CSV.zip",
    "Portfolios_Formed_on_INV_Daily": "Portfolios_Formed_on_INV_Daily_CSV.zip",
    "6_Portfolios_2x3": "6_Portfolios_2x3_CSV.zip",
    "6_Portfolios_2x3_Wout_Div": "6_Portfolios_2x3_Wout_Div_CSV.zip",
    "6_Portfolios_2x3_weekly": "6_Portfolios_2x3_weekly_CSV.zip",
    "6_Portfolios_2x3_daily": "6_Portfolios_2x3_daily_CSV.zip",
    "25_Portfolios_5x5": "25_Portfolios_5x5_CSV.zip",
    "25_Portfolios_5x5_Wout_Div": "25_Portfolios_5x5_Wout_Div_CSV.zip",
    "25_Portfolios_5x5_Daily": "25_Portfolios_5x5_Daily_CSV.zip",
    "100_Portfolios_10x10": "100_Portfolios_10x10_CSV.zip",
    "100_Portfolios_10x10_Wout_Div": "100_Portfolios_10x10_Wout_Div_CSV.zip",
    "100_Portfolios_10x10_Daily": "100_Portfolios_10x10_Daily_CSV.zip",
    "6_Portfolios_ME_OP_2x3": "6_Portfolios_ME_OP_2x3_CSV.zip",
    "6_Portfolios_ME_OP_2x3_Wout_Div": "6_Portfolios_ME_OP_2x3_Wout_Div_CSV.zip",
    "6_Portfolios_ME_OP_2x3_daily": "6_Portfolios_ME_OP_2x3_daily_CSV.zip",
    "25_Portfolios_ME_OP_5x5": "25_Portfolios_ME_OP_5x5_CSV.zip",
    "25_Portfolios_ME_OP_5x5_Wout_Div": "25_Portfolios_ME_OP_5x5_Wout_Div_CSV.zip",
    "25_Portfolios_ME_OP_5x5_daily": "25_Portfolios_ME_OP_5x5_daily_CSV.zip",
    "100_Portfolios_ME_OP_10x10": "100_Portfolios_ME_OP_10x10_CSV.zip",
    "100_Portfolios_10x10_ME_OP_Wout_Div": "100_Portfolios_10x10_ME_OP_Wout_Div_CSV.zip",
    "100_Portfolios_ME_OP_10x10_daily": "100_Portfolios_ME_OP_10x10_daily_CSV.zip",
    "6_Portfolios_ME_INV_2x3": "6_Portfolios_ME_INV_2x3_CSV.zip",
    "6_Portfolios_ME_INV_2x3_Wout_Div": "6_Portfolios_ME_INV_2x3_Wout_Div_CSV.zip",
    "6_Portfolios_ME_INV_2x3_daily": "6_Portfolios_ME_INV_2x3_daily_CSV.zip",
    "25_Portfolios_ME_INV_5x5": "25_Portfolios_ME_INV_5x5_CSV.zip",
    "25_Portfolios_ME_INV_5x5_Wout_Div": "25_Portfolios_ME_INV_5x5_Wout_Div_CSV.zip",
    "25_Portfolios_ME_INV_5x5_daily": "25_Portfolios_ME_INV_5x5_daily_CSV.zip",
    "100_Portfolios_ME_INV_10x10": "100_Portfolios_ME_INV_10x10_CSV.zip",
    "100_Portfolios_10x10_ME_INV_Wout_Div": "100_Portfolios_10x10_ME_INV_Wout_Div_CSV.zip",
    "100_Portfolios_ME_INV_10x10_daily": "100_Portfolios_ME_INV_10x10_daily_CSV.zip",
    "25_Portfolios_BEME_OP_5x5": "25_Portfolios_BEME_OP_5x5_CSV.zip",
    "25_Portfolios_BEME_OP_5x5_Wout_Div": "25_Portfolios_BEME_OP_5x5_Wout_Div_CSV.zip",
    "25_Portfolios_BEME_OP_5x5_daily": "25_Portfolios_BEME_OP_5x5_daily_CSV.zip",
    "25_Portfolios_BEME_INV_5x5": "25_Portfolios_BEME_INV_5x5_CSV.zip",
    "25_Portfolios_BEME_INV_5x5_Wout_Div": "25_Portfolios_BEME_INV_5x5_Wout_Div_CSV.zip",
    "25_Portfolios_BEME_INV_5x5_daily": "25_Portfolios_BEME_INV_5x5_daily_CSV.zip",
    "25_Portfolios_OP_INV_5x5": "25_Portfolios_OP_INV_5x5_CSV.zip",
    "25_Portfolios_OP_INV_5x5_Wout_Div": "25_Portfolios_OP_INV_5x5_Wout_Div_CSV.zip",
    "25_Portfolios_OP_INV_5x5_daily": "25_Portfolios_OP_INV_5x5_daily_CSV.zip",
    "32_Portfolios_ME_BEME_OP_2x4x4": "32_Portfolios_ME_BEME_OP_2x4x4_CSV.zip",
    "32_Portfolios_ME_BEME_OP_2x4x4_Wout_Div": "32_Portfolios_ME_BEME_OP_2x4x4_Wout_Div_CSV.zip",
    "32_Portfolios_ME_BEME_INV_2x4x4": "32_Portfolios_ME_BEME_INV_2x4x4_CSV.zip",
    "32_Portfolios_ME_BEME_INV_2x4x4_Wout_Div": "32_Portfolios_ME_BEME_INV_2x4x4_Wout_Div_CSV.zip",
    "32_Portfolios_ME_OP_INV_2x4x4": "32_Portfolios_ME_OP_INV_2x4x4_CSV.zip",
    "32_Portfolios_ME_OP_INV_2x4x4_Wout_Div": "32_Portfolios_ME_OP_INV_2x4x4_Wout_Div_CSV.zip",
    "Portfolios_Formed_on_E-P": "Portfolios_Formed_on_E-P_CSV.zip",
    "Portfolios_Formed_on_E-P_Wout_Div": "Portfolios_Formed_on_E-P_Wout_Div_CSV.zip",
    "Portfolios_Formed_on_CF-P": "Portfolios_Formed_on_CF-P_CSV.zip",
    "Portfolios_Formed_on_CF-P_Wout_Div": "Portfolios_Formed_on_CF-P_Wout_Div_CSV.zip",
    "Portfolios_Formed_on_D-P": "Portfolios_Formed_on_D-P_CSV.zip",
    "Portfolios_Formed_on_D-P_Wout_Div": "Portfolios_Formed_on_D-P_Wout_Div_CSV.zip",
    "6_Portfolios_ME_EP_2x3": "6_Portfolios_ME_EP_2x3_CSV.zip",
    "6_Portfolios_ME_EP_2x3_Wout_Div": "6_Portfolios_ME_EP_2x3_Wout_Div_CSV.zip",
    "6_Portfolios_ME_CFP_2x3": "6_Portfolios_ME_CFP_2x3_CSV.zip",
    "6_Portfolios_ME_CFP_2x3_Wout_Div": "6_Portfolios_ME_CFP_2x3_Wout_Div_CSV.zip",
    "6_Portfolios_ME_DP_2x3": "6_Portfolios_ME_DP_2x3_CSV.zip",
    "6_Portfolios_ME_DP_2x3_Wout_Div": "6_Portfolios_ME_DP_2x3_Wout_Div_CSV.zip",
    "F-F_Momentum_Factor": "F-F_Momentum_Factor_CSV.zip",
    "F-F_Momentum_Factor_daily": "F-F_Momentum_Factor_daily_CSV.zip",
    "6_Portfolios_ME_Prior_12_2": "6_Portfolios_ME_Prior_12_2_CSV.zip",
    "6_Portfolios_ME_Prior_12_2_Daily": "6_Portfolios_ME_Prior_12_2_Daily_CSV.zip",
    "25_Portfolios_ME_Prior_12_2": "25_Portfolios_ME_Prior_12_2_CSV.zip",
    "25_Portfolios_ME_Prior_12_2_Daily": "25_Portfolios_ME_Prior_12_2_Daily_CSV.zip",
    "10_Portfolios_Prior_12_2": "10_Portfolios_Prior_12_2_CSV.zip",
    "10_Portfolios_Prior_12_2_Daily": "10_Portfolios_Prior_12_2_Daily_CSV.zip",
    "F-F_ST_Reversal_Factor": "F-F_ST_Reversal_Factor_CSV.zip",
    "F-F_ST_Reversal_Factor_daily": "F-F_ST_Reversal_Factor_daily_CSV.zip",
    "6_Portfolios_ME_Prior_1_0": "6_Portfolios_ME_Prior_1_0_CSV.zip",
    "6_Portfolios_ME_Prior_1_0_Daily": "6_Portfolios_ME_Prior_1_0_Daily_CSV.zip",
    "25_Portfolios_ME_Prior_1_0": "25_Portfolios_ME_Prior_1_0_CSV.zip",
    "25_Portfolios_ME_Prior_1_0_Daily": "25_Portfolios_ME_Prior_1_0_Daily_CSV.zip",
    "10_Portfolios_Prior_1_0": "10_Portfolios_Prior_1_0_CSV.zip",
    "10_Portfolios_Prior_1_0_Daily": "10_Portfolios_Prior_1_0_Daily_CSV.zip",
    "F-F_LT_Reversal_Factor": "F-F_LT_Reversal_Factor_CSV.zip",
    "F-F_LT_Reversal_Factor_daily": "F-F_LT_Reversal_Factor_daily_CSV.zip",
    "6_Portfolios_ME_Prior_60_13": "6_Portfolios_ME_Prior_60_13_CSV.zip",
    "6_Portfolios_ME_Prior_60_13_Daily": "6_Portfolios_ME_Prior_60_13_Daily_CSV.zip",
    "25_Portfolios_ME_Prior_60_13": "25_Portfolios_ME_Prior_60_13_CSV.zip",
    "25_Portfolios_ME_Prior_60_13_Daily": "25_Portfolios_ME_Prior_60_13_Daily_CSV.zip",
    "10_Portfolios_Prior_60_13": "10_Portfolios_Prior_60_13_CSV.zip",
    "10_Portfolios_Prior_60_13_Daily": "10_Portfolios_Prior_60_13_Daily_CSV.zip",
    "Portfolios_Formed_on_AC": "Portfolios_Formed_on_AC_CSV.zip",
    "25_Portfolios_ME_AC_5x5": "25_Portfolios_ME_AC_5x5_CSV.zip",
    "Portfolios_Formed_on_BETA": "Portfolios_Formed_on_BETA_CSV.zip",
    "25_Portfolios_ME_BETA_5x5": "25_Portfolios_ME_BETA_5x5_CSV.zip",
    "Portfolios_Formed_on_NI": "Portfolios_Formed_on_NI_CSV.zip",
    "25_Portfolios_ME_NI_5x5": "25_Portfolios_ME_NI_5x5_CSV.zip",
    "Portfolios_Formed_on_VAR": "Portfolios_Formed_on_VAR_CSV.zip",
    "25_Portfolios_ME_VAR_5x5": "25_Portfolios_ME_VAR_5x5_CSV.zip",
    "Portfolios_Formed_on_RESVAR": "Portfolios_Formed_on_RESVAR_CSV.zip",
    "25_Portfolios_ME_RESVAR_5x5": "25_Portfolios_ME_RESVAR_5x5_CSV.zip",
    "5_Industry_Portfolios": "5_Industry_Portfolios_CSV.zip",
    "5_Industry_Portfolios_Wout_Div": "5_Industry_Portfolios_Wout_Div_CSV.zip",
    "5_Industry_Portfolios_daily": "5_Industry_Portfolios_daily_CSV.zip",
    "10_Industry_Portfolios": "10_Industry_Portfolios_CSV.zip",
    "10_Industry_Portfolios_Wout_Div": "10_Industry_Portfolios_Wout_Div_CSV.zip",
    "10_Industry_Portfolios_daily": "10_Industry_Portfolios_daily_CSV.zip",
    "12_Industry_Portfolios": "12_Industry_Portfolios_CSV.zip",
    "12_Industry_Portfolios_Wout_Div": "12_Industry_Portfolios_Wout_Div_CSV.zip",
    "12_Industry_Portfolios_daily": "12_Industry_Portfolios_daily_CSV.zip",
    "17_Industry_Portfolios": "17_Industry_Portfolios_CSV.zip",
    "17_Industry_Portfolios_Wout_Div": "17_Industry_Portfolios_Wout_Div_CSV.zip",
    "17_Industry_Portfolios_daily": "17_Industry_Portfolios_daily_CSV.zip",
    "30_Industry_Portfolios": "30_Industry_Portfolios_CSV.zip",
    "30_Industry_Portfolios_Wout_Div": "30_Industry_Portfolios_Wout_Div_CSV.zip",
    "30_Industry_Portfolios_daily": "30_Industry_Portfolios_daily_CSV.zip",
    "38_Industry_Portfolios": "38_Industry_Portfolios_CSV.zip",
    "38_Industry_Portfolios_Wout_Div": "38_Industry_Portfolios_Wout_Div_CSV.zip",
    "38_Industry_Portfolios_daily": "38_Industry_Portfolios_daily_CSV.zip",
    "48_Industry_Portfolios": "48_Industry_Portfolios_CSV.zip",
    "48_Industry_Portfolios_Wout_Div": "48_Industry_Portfolios_Wout_Div_CSV.zip",
    "48_Industry_Portfolios_daily": "48_Industry_Portfolios_daily_CSV.zip",
    "49_Industry_Portfolios": "49_Industry_Portfolios_CSV.zip",
    "49_Industry_Portfolios_Wout_Div": "49_Industry_Portfolios_Wout_Div_CSV.zip",
    "49_Industry_Portfolios_daily": "49_Industry_Portfolios_daily_CSV.zip",
    "ME_Breakpoints": "ME_Breakpoints_CSV.zip",
    "BE-ME_Breakpoints": "BE-ME_Breakpoints_CSV.zip",
    "OP_Breakpoints": "OP_Breakpoints_CSV.zip",
    "INV_Breakpoints": "INV_Breakpoints_CSV.zip",
    "E-P_Breakpoints": "E-P_Breakpoints_CSV.zip",
    "CF-P_Breakpoints": "CF-P_Breakpoints_CSV.zip",
    "D-P_Breakpoints": "D-P_Breakpoints_CSV.zip",
    "Prior_2-12_Breakpoints": "Prior_2-12_Breakpoints_CSV.zip",
    "Developed_3_Factors": "Developed_3_Factors_CSV.zip",
    "Developed_3_Factors_Daily": "Developed_3_Factors_Daily_CSV.zip",
    "Developed_ex_US_3_Factors": "Developed_ex_US_3_Factors_CSV.zip",
    "Developed_ex_US_3_Factors_Daily": "Developed_ex_US_3_Factors_Daily_CSV.zip",
    "Europe_3_Factors": "Europe_3_Factors_CSV.zip",
    "Europe_3_Factors_Daily": "Europe_3_Factors_Daily_CSV.zip",
    "Japan_3_Factors": "Japan_3_Factors_CSV.zip",
    "Japan_3_Factors_Daily": "Japan_3_Factors_Daily_CSV.zip",
    "Asia_Pacific_ex_Japan_3_Factors": "Asia_Pacific_ex_Japan_3_Factors_CSV.zip",
    "Asia_Pacific_ex_Japan_3_Factors_Daily": "Asia_Pacific_ex_Japan_3_Factors_Daily_CSV.zip",
    "North_America_3_Factors": "North_America_3_Factors_CSV.zip",
    "North_America_3_Factors_Daily": "North_America_3_Factors_Daily_CSV.zip",
    "Developed_5_Factors": "Developed_5_Factors_CSV.zip",
    "Developed_5_Factors_Daily": "Developed_5_Factors_Daily_CSV.zip",
    "Developed_ex_US_5_Factors": "Developed_ex_US_5_Factors_CSV.zip",
    "Developed_ex_US_5_Factors_Daily": "Developed_ex_US_5_Factors_Daily_CSV.zip",
    "Europe_5_Factors": "Europe_5_Factors_CSV.zip",
    "Europe_5_Factors_Daily": "Europe_5_Factors_Daily_CSV.zip",
    "Japan_5_Factors": "Japan_5_Factors_CSV.zip",
    "Japan_5_Factors_Daily": "Japan_5_Factors_Daily_CSV.zip",
    "Asia_Pacific_ex_Japan_5_Factors": "Asia_Pacific_ex_Japan_5_Factors_CSV.zip",
    "Asia_Pacific_ex_Japan_5_Factors_Daily": "Asia_Pacific_ex_Japan_5_Factors_Daily_CSV.zip",
    "North_America_5_Factors": "North_America_5_Factors_CSV.zip",
    "North_America_5_Factors_Daily": "North_America_5_Factors_Daily_CSV.zip",
    "Developed_Mom_Factor": "Developed_Mom_Factor_CSV.zip",
    "Developed_Mom_Factor_Daily": "Developed_Mom_Factor_Daily_CSV.zip",
    "Developed_ex_US_Mom_Factor": "Developed_ex_US_Mom_Factor_CSV.zip",
    "Developed_ex_US_Mom_Factor_Daily": "Developed_ex_US_Mom_Factor_Daily_CSV.zip",
    "Europe_Mom_Factor": "Europe_Mom_Factor_CSV.zip",
    "Europe_Mom_Factor_Daily": "Europe_Mom_Factor_Daily_CSV.zip",
    "Japan_Mom_Factor": "Japan_Mom_Factor_CSV.zip",
    "Japan_Mom_Factor_Daily": "Japan_Mom_Factor_Daily_CSV.zip",
    "Asia_Pacific_ex_Japan_MOM_Factor": "Asia_Pacific_ex_Japan_MOM_Factor_CSV.zip",
    "Asia_Pacific_ex_Japan_MOM_Factor_Daily": "Asia_Pacific_ex_Japan_MOM_Factor_Daily_CSV.zip",
    "North_America_Mom_Factor": "North_America_Mom_Factor_CSV.zip",
    "North_America_Mom_Factor_Daily": "North_America_Mom_Factor_Daily_CSV.zip",
    "Developed_6_Portfolios_ME_BE-ME": "Developed_6_Portfolios_ME_BE-ME_CSV.zip",
    "Developed_6_Portfolios_ME_BE-ME_daily": "Developed_6_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Developed_ex_US_6_Portfolios_ME_BE-ME": "Developed_ex_US_6_Portfolios_ME_BE-ME_CSV.zip",
    "Developed_ex_US_6_Portfolios_ME_BE-ME_daily": "Developed_ex_US_6_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Europe_6_Portfolios_ME_BE-ME": "Europe_6_Portfolios_ME_BE-ME_CSV.zip",
    "Europe_6_Portfolios_ME_BE-ME_daily": "Europe_6_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Japan_6_Portfolios_ME_BE-ME": "Japan_6_Portfolios_ME_BE-ME_CSV.zip",
    "Japan_6_Portfolios_ME_BE-ME_daily": "Japan_6_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Asia_Pacific_ex_Japan_6_Portfolios_ME_BE-ME": "Asia_Pacific_ex_Japan_6_Portfolios_ME_BE-ME_CSV.zip",
    "Asia_Pacific_ex_Japan_6_Portfolios_ME_BE-ME_daily": "Asia_Pacific_ex_Japan_6_Portfolios_ME_BE-ME_daily_CSV.zip",
    "North_America_6_Portfolios_ME_BE-ME": "North_America_6_Portfolios_ME_BE-ME_CSV.zip",
    "North_America_6_Portfolios_ME_BE-ME_daily": "North_America_6_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Developed_25_Portfolios_ME_BE-ME": "Developed_25_Portfolios_ME_BE-ME_CSV.zip",
    "Developed_25_Portfolios_ME_BE-ME_daily": "Developed_25_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Developed_ex_US_25_Portfolios_ME_BE-ME": "Developed_ex_US_25_Portfolios_ME_BE-ME_CSV.zip",
    "Developed_ex_US_25_Portfolios_ME_BE-ME_daily": "Developed_ex_US_25_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Europe_25_Portfolios_ME_BE-ME": "Europe_25_Portfolios_ME_BE-ME_CSV.zip",
    "Europe_25_Portfolios_ME_BE-ME_daily": "Europe_25_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Japan_25_Portfolios_ME_BE-ME": "Japan_25_Portfolios_ME_BE-ME_CSV.zip",
    "Japan_25_Portfolios_ME_BE-ME_daily": "Japan_25_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Asia_Pacific_ex_Japan_25_Portfolios_ME_BE-ME": "Asia_Pacific_ex_Japan_25_Portfolios_ME_BE-ME_CSV.zip",
    "Asia_Pacific_ex_Japan_25_Portfolios_ME_BE-ME_daily": "Asia_Pacific_ex_Japan_25_Portfolios_ME_BE-ME_daily_CSV.zip",
    "North_America_25_Portfolios_ME_BE-ME": "North_America_25_Portfolios_ME_BE-ME_CSV.zip",
    "North_America_25_Portfolios_ME_BE-ME_daily": "North_America_25_Portfolios_ME_BE-ME_daily_CSV.zip",
    "Developed_6_Portfolios_ME_OP": "Developed_6_Portfolios_ME_OP_CSV.zip",
    "Developed_6_Portfolios_ME_OP_Daily": "Developed_6_Portfolios_ME_OP_Daily_CSV.zip",
    "Developed_ex_US_6_Portfolios_ME_OP": "Developed_ex_US_6_Portfolios_ME_OP_CSV.zip",
    "Developed_ex_US_6_Portfolios_ME_OP_Daily": "Developed_ex_US_6_Portfolios_ME_OP_Daily_CSV.zip",
    "Europe_6_Portfolios_ME_OP": "Europe_6_Portfolios_ME_OP_CSV.zip",
    "Europe_6_Portfolios_ME_OP_Daily": "Europe_6_Portfolios_ME_OP_Daily_CSV.zip",
    "Japan_6_Portfolios_ME_OP": "Japan_6_Portfolios_ME_OP_CSV.zip",
    "Japan_6_Portfolios_ME_OP_Daily": "Japan_6_Portfolios_ME_OP_Daily_CSV.zip",
    "Asia_Pacific_ex_Japan_6_Portfolios_ME_OP": "Asia_Pacific_ex_Japan_6_Portfolios_ME_OP_CSV.zip",
    "Asia_Pacific_ex_Japan_6_Portfolios_ME_OP_Daily": "Asia_Pacific_ex_Japan_6_Portfolios_ME_OP_Daily_CSV.zip",
    "North_America_6_Portfolios_ME_OP": "North_America_6_Portfolios_ME_OP_CSV.zip",
    "North_America_6_Portfolios_ME_OP_Daily": "North_America_6_Portfolios_ME_OP_Daily_CSV.zip",
    "Developed_25_Portfolios_ME_OP": "Developed_25_Portfolios_ME_OP_CSV.zip",
    "Developed_25_Portfolios_ME_OP_Daily": "Developed_25_Portfolios_ME_OP_Daily_CSV.zip",
    "Developed_ex_US_25_Portfolios_ME_OP": "Developed_ex_US_25_Portfolios_ME_OP_CSV.zip",
    "Developed_ex_US_25_Portfolios_ME_OP_Daily": "Developed_ex_US_25_Portfolios_ME_OP_Daily_CSV.zip",
    "Europe_25_Portfolios_ME_OP": "Europe_25_Portfolios_ME_OP_CSV.zip",
    "Europe_25_Portfolios_ME_OP_Daily": "Europe_25_Portfolios_ME_OP_Daily_CSV.zip",
    "Japan_25_Portfolios_ME_OP": "Japan_25_Portfolios_ME_OP_CSV.zip",
    "Japan_25_Portfolios_ME_OP_Daily": "Japan_25_Portfolios_ME_OP_Daily_CSV.zip",
    "Asia_Pacific_ex_Japan_25_Portfolios_ME_OP": "Asia_Pacific_ex_Japan_25_Portfolios_ME_OP_CSV.zip",
    "Asia_Pacific_ex_Japan_25_Portfolios_ME_OP_Daily": "Asia_Pacific_ex_Japan_25_Portfolios_ME_OP_Daily_CSV.zip",
    "North_America_25_Portfolios_ME_OP": "North_America_25_Portfolios_ME_OP_CSV.zip",
    "North_America_25_Portfolios_ME_OP_Daily": "North_America_25_Portfolios_ME_OP_Daily_CSV.zip",
    "Developed_6_Portfolios_ME_INV": "Developed_6_Portfolios_ME_INV_CSV.zip",
    "Developed_6_Portfolios_ME_INV_Daily": "Developed_6_Portfolios_ME_INV_Daily_CSV.zip",
    "Developed_ex_US_6_Portfolios_ME_INV": "Developed_ex_US_6_Portfolios_ME_INV_CSV.zip",
    "Developed_ex_US_6_Portfolios_ME_INV_Daily": "Developed_ex_US_6_Portfolios_ME_INV_Daily_CSV.zip",
    "Europe_6_Portfolios_ME_INV": "Europe_6_Portfolios_ME_INV_CSV.zip",
    "Europe_6_Portfolios_ME_INV_Daily": "Europe_6_Portfolios_ME_INV_Daily_CSV.zip",
    "Japan_6_Portfolios_ME_INV": "Japan_6_Portfolios_ME_INV_CSV.zip",
    "Japan_6_Portfolios_ME_INV_Daily": "Japan_6_Portfolios_ME_INV_Daily_CSV.zip",
    "Asia_Pacific_ex_Japan_6_Portfolios_ME_INV": "Asia_Pacific_ex_Japan_6_Portfolios_ME_INV_CSV.zip",
    "Asia_Pacific_ex_Japan_6_Portfolios_ME_INV_Daily": "Asia_Pacific_ex_Japan_6_Portfolios_ME_INV_Daily_CSV.zip",
    "North_America_6_Portfolios_ME_INV": "North_America_6_Portfolios_ME_INV_CSV.zip",
    "North_America_6_Portfolios_ME_INV_Daily": "North_America_6_Portfolios_ME_INV_Daily_CSV.zip",
    "Developed_25_Portfolios_ME_INV": "Developed_25_Portfolios_ME_INV_CSV.zip",
    "Developed_25_Portfolios_ME_INV_Daily": "Developed_25_Portfolios_ME_INV_Daily_CSV.zip",
    "Developed_ex_US_25_Portfolios_ME_INV": "Developed_ex_US_25_Portfolios_ME_INV_CSV.zip",
    "Developed_ex_US_25_Portfolios_ME_INV_Daily": "Developed_ex_US_25_Portfolios_ME_INV_Daily_CSV.zip",
    "Europe_25_Portfolios_ME_INV": "Europe_25_Portfolios_ME_INV_CSV.zip",
    "Europe_25_Portfolios_ME_INV_Daily": "Europe_25_Portfolios_ME_INV_Daily_CSV.zip",
    "Japan_25_Portfolios_ME_INV": "Japan_25_Portfolios_ME_INV_CSV.zip",
    "Japan_25_Portfolios_ME_INV_Daily": "Japan_25_Portfolios_ME_INV_Daily_CSV.zip",
    "Asia_Pacific_ex_Japan_25_Portfolios_ME_INV": "Asia_Pacific_ex_Japan_25_Portfolios_ME_INV_CSV.zip",
    "Asia_Pacific_ex_Japan_25_Portfolios_ME_INV_Daily": "Asia_Pacific_ex_Japan_25_Portfolios_ME_INV_Daily_CSV.zip",
    "North_America_25_Portfolios_ME_INV": "North_America_25_Portfolios_ME_INV_CSV.zip",
    "North_America_25_Portfolios_ME_INV_Daily": "North_America_25_Portfolios_ME_INV_Daily_CSV.zip",
    "Developed_6_Portfolios_ME_Prior_12_2": "Developed_6_Portfolios_ME_Prior_12_2_CSV.zip",
    "Developed_6_Portfolios_ME_Prior_250_20_daily": "Developed_6_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Developed_ex_US_6_Portfolios_ME_Prior_12_2": "Developed_ex_US_6_Portfolios_ME_Prior_12_2_CSV.zip",
    "Developed_ex_US_6_Portfolios_ME_Prior_250_20_daily": "Developed_ex_US_6_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Europe_6_Portfolios_ME_Prior_12_2": "Europe_6_Portfolios_ME_Prior_12_2_CSV.zip",
    "Europe_6_Portfolios_ME_Prior_250_20_daily": "Europe_6_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Japan_6_Portfolios_ME_Prior_12_2": "Japan_6_Portfolios_ME_Prior_12_2_CSV.zip",
    "Japan_6_Portfolios_ME_Prior_250_20_daily": "Japan_6_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Asia_Pacific_ex_Japan_6_Portfolios_ME_Prior_12_2": "Asia_Pacific_ex_Japan_6_Portfolios_ME_Prior_12_2_CSV.zip",
    "Asia_Pacific_ex_Japan_6_Portfolios_ME_Prior_250_20_daily": "Asia_Pacific_ex_Japan_6_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "North_America_6_Portfolios_ME_Prior_12_2": "North_America_6_Portfolios_ME_Prior_12_2_CSV.zip",
    "North_America_6_Portfolios_ME_Prior_250_20_daily": "North_America_6_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Developed_25_Portfolios_ME_Prior_12_2": "Developed_25_Portfolios_ME_Prior_12_2_CSV.zip",
    "Developed_25_Portfolios_ME_Prior_250_20_daily": "Developed_25_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Developed_ex_US_25_Portfolios_ME_Prior_12_2": "Developed_ex_US_25_Portfolios_ME_Prior_12_2_CSV.zip",
    "Developed_ex_US_25_Portfolios_ME_Prior_250_20_daily": "Developed_ex_US_25_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Europe_25_Portfolios_ME_Prior_12_2": "Europe_25_Portfolios_ME_Prior_12_2_CSV.zip",
    "Europe_25_Portfolios_ME_Prior_250_20_daily": "Europe_25_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Japan_25_Portfolios_ME_Prior_12_2": "Japan_25_Portfolios_ME_Prior_12_2_CSV.zip",
    "Japan_25_Portfolios_ME_Prior_250_20_daily": "Japan_25_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Asia_Pacific_ex_Japan_25_Portfolios_ME_Prior_12_2": "Asia_Pacific_ex_Japan_25_Portfolios_ME_Prior_12_2_CSV.zip",
    "Asia_Pacific_ex_Japan_25_Portfolios_ME_Prior_250_20_daily": "Asia_Pacific_ex_Japan_25_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "North_America_25_Portfolios_ME_Prior_12_2": "North_America_25_Portfolios_ME_Prior_12_2_CSV.zip",
    "North_America_25_Portfolios_ME_Prior_250_20_daily": "North_America_25_Portfolios_ME_Prior_250_20_daily_CSV.zip",
    "Developed_32_Portfolios_ME_BE-ME_OP_2x4x4": "Developed_32_Portfolios_ME_BE-ME_OP_2x4x4_CSV.zip",
    "Developed_ex_US_32_Portfolios_ME_BE-ME_OP_2x4x4": "Developed_ex_US_32_Portfolios_ME_BE-ME_OP_2x4x4_CSV.zip",
    "Europe_32_Portfolios_ME_BE-ME_OP_2x4x4": "Europe_32_Portfolios_ME_BE-ME_OP_2x4x4_CSV.zip",
    "Japan_32_Portfolios_ME_BE-ME_OP_2x4x4": "Japan_32_Portfolios_ME_BE-ME_OP_2x4x4_CSV.zip",
    "Asia_Pacific_ex_Japan_32_Portfolios_ME_BE-ME_OP_2x4x4": "Asia_Pacific_ex_Japan_32_Portfolios_ME_BE-ME_OP_2x4x4_CSV.zip",
    "North_America_32_Portfolios_ME_BE-ME_OP_2x4x4": "North_America_32_Portfolios_ME_BE-ME_OP_2x4x4_CSV.zip",
    "Developed_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4": "Developed_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4_CSV.zip",
    "Developed_ex_US_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4": "Developed_ex_US_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4_CSV.zip",
    "Europe_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4": "Europe_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4_CSV.zip",
    "Japan_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4": "Japan_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4_CSV.zip",
    "Asia_Pacific_ex_Japan_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4": "Asia_Pacific_ex_Japan_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4_CSV.zip",
    "North_America_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4": "North_America_32_Portfolios_ME_BE-ME_INV(TA)_2x4x4_CSV.zip",
    "Developed_32_Portfolios_ME_INV(TA)_OP_2x4x4": "Developed_32_Portfolios_ME_INV(TA)_OP_2x4x4_CSV.zip",
    "Developed_ex_US_32_Portfolios_ME_INV(TA)_OP_2x4x4": "Developed_ex_US_32_Portfolios_ME_INV(TA)_OP_2x4x4_CSV.zip",
    "Europe_32_Portfolios_ME_INV(TA)_OP_2x4x4": "Europe_32_Portfolios_ME_INV(TA)_OP_2x4x4_CSV.zip",
    "Japan_32_Portfolios_ME_INV(TA)_OP_2x4x4": "Japan_32_Portfolios_ME_INV(TA)_OP_2x4x4_CSV.zip",
    "Asia_Pacific_ex_Japan_32_Portfolios_ME_INV(TA)_OP_2x4x4": "Asia_Pacific_ex_Japan_32_Portfolios_ME_INV(TA)_OP_2x4x4_CSV.zip",
    "North_America_32_Portfolios_ME_INV(TA)_OP_2x4x4": "North_America_32_Portfolios_ME_INV(TA)_OP_2x4x4_CSV.zip",
    "Emerging_5_Factors": "Emerging_5_Factors_CSV.zip",
    "Emerging_MOM_Factor": "Emerging_MOM_Factor_CSV.zip",
    "Emerging_Markets_6_Portfolios_ME_BE-ME": "Emerging_Markets_6_Portfolios_ME_BE-ME_CSV.zip",
    "Emerging_Markets_6_Portfolios_ME_OP": "Emerging_Markets_6_Portfolios_ME_OP_CSV.zip",
    "Emerging_Markets_6_Portfolios_ME_INV": "Emerging_Markets_6_Portfolios_ME_INV_CSV.zip",
    "Emerging_Markets_6_Portfolios_ME_Prior_12_2": "Emerging_Markets_6_Portfolios_ME_Prior_12_2_CSV.zip",
    "Emerging_Markets_4_Portfolios_BE-ME_OP": "Emerging_Markets_4_Portfolios_BE-ME_OP_CSV.zip",
    "Emerging_Markets_4_Portfolios_OP_INV": "Emerging_Markets_4_Portfolios_OP_INV_CSV.zip",
    "Emerging_Markets_4_Portfolios_BE-ME_INV": "Emerging_Markets_4_Portfolios_BE-ME_INV_CSV.zip",
}

DATASET_CHOICES = [
    {
        "label": k.replace("_", " "),
        "value": k,
    }
    for k in URL_MAP.keys()
]


REGIONS_MAP = {
    "america": "",
    "north_america": "North_America",
    "europe": "Europe",
    "japan": "Japan",
    "asia_pacific_ex_japan": "Asia_Pacific_ex_Japan",
    "developed": "Developed",
    "developed_ex_us": "Developed_ex_US",
    "emerging": "Emerging_Markets",
}

FACTOR_REGION_MAP = {
    "america": {
        "factors": {
            "3_Factors": "F-F_Research_Data_Factors",
            "5_Factors": "F-F_Research_Data_5_Factors_2x3",
            "Momentum": "F-F_Momentum_Factor",
            "ST_Reversal": "F-F_ST_Reversal_Factor",
            "LT_Reversal": "F-F_LT_Reversal_Factor",
        },
        "intervals": {
            "3_Factors": {
                "daily": "_daily",
                "weekly": "_weekly",
                "monthly": "",
                "annual": "",
            },
            "5_Factors": {"daily": "_daily", "monthly": "", "annual": ""},
            "Momentum": {"daily": "_daily", "monthly": ""},
            "ST_Reversal": {"daily": "_daily", "monthly": ""},
            "LT_Reversal": {"daily": "_daily", "monthly": ""},
        },
    },
    "north_america": {
        "factors": {
            "3_Factors": "North_America_3_Factors",
            "5_Factors": "North_America_5_Factors",
            "Momentum": "North_America_Mom_Factor",
        },
        "intervals": {
            "3_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "5_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "Momentum": {"daily": "_Daily", "monthly": "", "annual": ""},
        },
    },
    "europe": {
        "factors": {
            "3_Factors": "Europe_3_Factors",
            "5_Factors": "Europe_5_Factors",
            "Momentum": "Europe_Mom_Factor",
        },
        "intervals": {
            "3_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "5_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "Momentum": {"daily": "_Daily", "monthly": "", "annual": ""},
        },
    },
    "japan": {
        "factors": {
            "3_Factors": "Japan_3_Factors",
            "5_Factors": "Japan_5_Factors",
            "Momentum": "Japan_Mom_Factor",
        },
        "intervals": {
            "3_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "5_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "Momentum": {"daily": "_Daily", "monthly": "", "annual": ""},
        },
    },
    "asia_pacific_ex_japan": {
        "factors": {
            "3_Factors": "Asia_Pacific_ex_Japan_3_Factors",
            "5_Factors": "Asia_Pacific_ex_Japan_5_Factors",
            "Momentum": "Asia_Pacific_ex_Japan_MOM_Factor",
        },
        "intervals": {
            "3_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "5_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "Momentum": {"daily": "_Daily", "monthly": "", "annual": ""},
        },
    },
    "developed": {
        "factors": {
            "3_Factors": "Developed_3_Factors",
            "5_Factors": "Developed_5_Factors",
            "Momentum": "Developed_Mom_Factor",
        },
        "intervals": {
            "3_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "5_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "Momentum": {"daily": "_Daily", "monthly": "", "annual": ""},
        },
    },
    "developed_ex_us": {
        "factors": {
            "3_Factors": "Developed_ex_US_3_Factors",
            "5_Factors": "Developed_ex_US_5_Factors",
            "Momentum": "Developed_ex_US_Mom_Factor",
        },
        "intervals": {
            "3_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "5_Factors": {"daily": "_Daily", "monthly": "", "annual": ""},
            "Momentum": {"daily": "_Daily", "monthly": "", "annual": ""},
        },
    },
    "emerging": {
        "factors": {
            "5_Factors": "Emerging_5_Factors",
            "Momentum": "Emerging_MOM_Factor",
        },
        "intervals": {
            "5_Factors": {"monthly": "", "annual": ""},
            "Momentum": {"monthly": "", "annual": ""},
        },
    },
}
